# -*- coding: utf-8 -*-

import os

import asr_utils
from asr_config import Config
from asr_model import BiRNN



conf = Config()

# 加载数据
(train_wav_files, train_text_labels), (test_wav_files, test_text_labels) = asr_utils.get_wavs_lables()

# 使用完整数据集构建字典
words_size, words, word_num_map = asr_utils.create_dict(train_text_labels + test_text_labels)

# 创建测试模型
test_model = ASR(test_wav_files, test_text_labels, words_size, words, word_num_map, is_training=False)
test_model.build_test()


# wav_files = ["D:\data_thchs30\data_thchs30\data\B2_250.wav"]
# txt_labels = ['嫌疑犯 眼看 脱逃 无望 窜 上 屋顶 纵身 跳下 意欲 自杀 结果 摔成 骨折 被 生擒']
# bi_rnn = BiRNN(wav_files, test_text_labels, words_size, words, word_num_map)
# bi_rnn.build_target_wav_file_test(wav_files, txt_labels)
